home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-02 | 805 b | 51 lines | [TEXT/????] |
- //
- // NOCRT.CPP
- //
- // Copyright (C) Microsoft Corporation, 1996
- //
- // Replacement C runtime routines to avoid pulling in any unnecessary goo.
- //
-
- #include "config.h"
-
- #define FAR
-
- #include <ole2.h>
- #include <dispatch.h>
- #include <wintypes.h>
- #include "debug.h"
- #include "nocrt.h"
-
- #define __cdecl
-
- LPOLESTR OleStrdup(LPCOLESTR psz)
- {
- LPOLESTR pszDup;
-
- if ((pszDup = (LPOLESTR) CoTaskMemAlloc(strlen((char *) psz) + 1)) != NULL)
- strcpy((char *) pszDup, (const char *) psz);
-
- return pszDup;
- }
-
- #ifdef ACTIVEX_CONTROL
- void * __cdecl operator new(size_t nSize)
- {
- return CoTaskMemAlloc(nSize);
- }
-
- void __cdecl operator delete(void *pv)
- {
- CoTaskMemFree(pv);
- }
-
- int __cdecl _purecall(void);
- int __cdecl _purecall(void)
- {
- #ifdef _DEBUG
- Debugger();
- #endif
- return 0;
- }
- #endif
-